perm filename FIND.TES[UP,DOC] blob
sn#081420 filedate 1974-01-15 generic text, type T, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
RECORD PAGE DESCRIPTION
00001 00001
00002 00002
00006 ENDMK
⊗;
FIND
Find is a system command. It has the following legal form (brackets
denote optional things):
FIND [EXACTLY] key [IN [file]]
If file=PHONE, or is omitted entirely, the A.I. Project Phone
Directory is read. Otherwise, the specified file is read.
If a key contains any spaces or tabs, it must be separated from the
file name (if present) with the word "IN", or delimited by
"-characters or the quote pair `...'. A ` or ' character may appear
in the former, and a " may appear in the latter. If the number of
spaces and tabs in the key is significant (in EXACTLY mode), the
quoted form should be used.
The file is logically divided into paragraphs. A paragraph consists
of twenty or fewer consecutive non-blank lines on one page.
FIND searches the file for paragraphs that contain the key. Each
paragraph containing the key is a "HIT" and is typed out. Also, the
hits are counted and the count is printed at the end.
The EXACTLY qualification causes FIND to search for an Exact Match.
Otherwise it performs a Template Match. A Template Match recognizes
two special symbols in the key: Space (one or more consecutive
spaces) and Triple-Dot (three or more consecutive dots). A Space in
the key matches zero or more spaces, tabs, and CRLFs in the
Paragraph. A Triple Dot in the key matches zero or more arbitrary
characters in the Paragraph. Furthermore, in a Template Match, upper
and lower case letters are equated. The EXACTLY search is somewhat
quicker.
Examples:
.FIND john...lathrop<cr>
*Prof. John McCarthy JMC 300 2 John
*45 4430 MTC*/RT* P
*(9) 321-7580 846 Lathrop Dr. Stanford
1 HIT ON KEY = john...lathrop
.
.FIND EXACTLY JMC
.FIND MCCARTHY
.FIND TARGET IN COMLIN.FAI
.FIND "TEMPLATE ... TARGET" COMLIN.FAI
.FIND TARGET BYTE IN COMLIN.FAI
.FIND LOMA VERDE